package com.nut.spp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nut.spp.entity.MemberLevelRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MemberLevelRecordMapper extends BaseMapper<MemberLevelRecord> {

    IPage<MemberLevelRecord> listPage(Page page,
                                      @Param("memberId") Long memberId,
                                      @Param("orderId") Long orderId,
                                      @Param("mobile") String mobile,
                                      @Param("goodsId") Integer goodsId,
                                      @Param("goodsType") Integer goodsType
    );

    @Select("select * from biz_member_level_record where member_id=#{memberId}")
    List<MemberLevelRecord> list(@Param("memberId") Long memberId);

}
